﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
  xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
  x:Class="System.Windows.Controls.Samples.AreaSample">
    <StackPanel>

        <!-- Scenarios -->
        <ContentControl Content="Scenarios" Style="{StaticResource Header}"/>

        <controlsToolkit:WrapPanel>

            <!-- Typical Use -->
            <Grid Style="{StaticResource WrapperStyle}">
                <chartingToolkit:Chart Title="Typical Use">
                    <chartingToolkit:Chart.Series>
                        <chartingToolkit:AreaSeries
                            Title="Particulate Levels"
                            ItemsSource="{Binding LevelsInRainfall, Source={StaticResource ParticulateLevel}}"
                            IndependentValueBinding="{Binding Rainfall}"
                            DependentValueBinding="{Binding Particulate}"/>
                    </chartingToolkit:Chart.Series>
                </chartingToolkit:Chart>
            </Grid>

            <!-- Chronological -->
            <Grid Style="{StaticResource WrapperStyle}">
                <chartingToolkit:Chart Title="Chronological">
                    <chartingToolkit:Chart.Series>
                        <chartingToolkit:AreaSeries
                            Title="Gizmo Popularity"
                            ItemsSource="{StaticResource GizmoPopularity}"
                            IndependentValueBinding="{Binding Date}"
                            DependentValueBinding="{Binding Percent}" />
                        <chartingToolkit:AreaSeries
                            Title="Widget Popularity"
                            ItemsSource="{StaticResource WidgetPopularity}"
                            IndependentValueBinding="{Binding Date}"
                            DependentValueBinding="{Binding Percent}" />
                    </chartingToolkit:Chart.Series>
                </chartingToolkit:Chart>
            </Grid>

        </controlsToolkit:WrapPanel>


        <!-- Generated Charts -->
        <ContentControl Content="Generated Charts" Style="{StaticResource Header}"/>
        <controlsToolkit:WrapPanel x:Name="GeneratedChartsPanel"/>

        <src:SourceViewer xmlns:src="clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples.Common" xmlns:sys="clr-namespace:System;assembly=mscorlib">
  <src:SourceFile Path="AreaSample.xaml">
    <src:SourceFile.Source>
      <sys:String>&lt;!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
--&gt;

&lt;UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
  xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
  x:Class="System.Windows.Controls.Samples.AreaSample"&gt;
    &lt;StackPanel&gt;

        &lt;!-- Scenarios --&gt;
        &lt;ContentControl Content="Scenarios" Style="{StaticResource Header}"/&gt;

        &lt;controlsToolkit:WrapPanel&gt;

            &lt;!-- Typical Use --&gt;
            &lt;Grid Style="{StaticResource WrapperStyle}"&gt;
                &lt;chartingToolkit:Chart Title="Typical Use"&gt;
                    &lt;chartingToolkit:Chart.Series&gt;
                        &lt;chartingToolkit:AreaSeries
                            Title="Particulate Levels"
                            ItemsSource="{Binding LevelsInRainfall, Source={StaticResource ParticulateLevel}}"
                            IndependentValueBinding="{Binding Rainfall}"
                            DependentValueBinding="{Binding Particulate}"/&gt;
                    &lt;/chartingToolkit:Chart.Series&gt;
                &lt;/chartingToolkit:Chart&gt;
            &lt;/Grid&gt;

            &lt;!-- Chronological --&gt;
            &lt;Grid Style="{StaticResource WrapperStyle}"&gt;
                &lt;chartingToolkit:Chart Title="Chronological"&gt;
                    &lt;chartingToolkit:Chart.Series&gt;
                        &lt;chartingToolkit:AreaSeries
                            Title="Gizmo Popularity"
                            ItemsSource="{StaticResource GizmoPopularity}"
                            IndependentValueBinding="{Binding Date}"
                            DependentValueBinding="{Binding Percent}" /&gt;
                        &lt;chartingToolkit:AreaSeries
                            Title="Widget Popularity"
                            ItemsSource="{StaticResource WidgetPopularity}"
                            IndependentValueBinding="{Binding Date}"
                            DependentValueBinding="{Binding Percent}" /&gt;
                    &lt;/chartingToolkit:Chart.Series&gt;
                &lt;/chartingToolkit:Chart&gt;
            &lt;/Grid&gt;

        &lt;/controlsToolkit:WrapPanel&gt;


        &lt;!-- Generated Charts --&gt;
        &lt;ContentControl Content="Generated Charts" Style="{StaticResource Header}"/&gt;
        &lt;controlsToolkit:WrapPanel x:Name="GeneratedChartsPanel"/&gt;
    &lt;/StackPanel&gt;
&lt;/UserControl&gt;
</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
  <src:SourceFile Path="AreaSample.xaml.cs">
    <src:SourceFile.Source>
      <sys:String>// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System.Windows.Controls;
using System.Windows.Controls.DataVisualization.Charting;
using System.ComponentModel;

namespace System.Windows.Controls.Samples
{
    /// &lt;summary&gt;
    /// Sample page demonstrating AreaSeries.
    /// &lt;/summary&gt;
    [Sample("Area Series", DifficultyLevel.Basic)]
    [Category("Area Series")]
    public partial class AreaSample : UserControl
    {
        /// &lt;summary&gt;
        /// Initializes a new instance of the AreaSample class.
        /// &lt;/summary&gt;
        public AreaSample()
        {
            InitializeComponent();

            SampleGenerators.GenerateNumericSeriesSamples(GeneratedChartsPanel, () =&gt; new AreaSeries(), true);
            SampleGenerators.GenerateDateTimeValueSeriesSamples(GeneratedChartsPanel, () =&gt; new AreaSeries());
            SampleGenerators.GenerateMultipleValueSeriesSamples(GeneratedChartsPanel, () =&gt; new AreaSeries(), true);
        }
    }
}</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
  <src:SourceFile Path="AreaSample.xaml.vb">
    <src:SourceFile.Source>
      <sys:String>' (c) Copyright Microsoft Corporation.
' This source is subject to the Microsoft Public License (Ms-PL).
' Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
' All other rights reserved.

Imports Microsoft.VisualBasic
Imports System.Windows.Controls
Imports System.Windows.Controls.DataVisualization.Charting
Imports System.ComponentModel

''' &lt;summary&gt;
''' Sample page demonstrating AreaSeries.
''' &lt;/summary&gt;
&lt;Sample("Area Series", DifficultyLevel.Basic), Category("Area Series")&gt; _
Partial Public Class AreaSample
    Inherits UserControl
    ''' &lt;summary&gt;
    ''' Initializes a new instance of the AreaSample class.
    ''' &lt;/summary&gt;
    &lt;System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Justification:="InitializeComponent Required by Visual Studio.")&gt; _
    Public Sub New()
        InitializeComponent()

        SampleGenerators.GenerateNumericSeriesSamples(GeneratedChartsPanel, Function() New AreaSeries(), True)
        SampleGenerators.GenerateDateTimeValueSeriesSamples(GeneratedChartsPanel, Function() New AreaSeries())
        SampleGenerators.GenerateMultipleValueSeriesSamples(GeneratedChartsPanel, Function() New AreaSeries(), True)
    End Sub
End Class</sys:String>
    </src:SourceFile.Source>
  </src:SourceFile>
</src:SourceViewer>
    </StackPanel>
</UserControl>
